﻿package mortal.game.net.command.task
{
    import Framework.MQ.*;
    import Message.Game.*;
    import com.gengine.debug.*;
    import flash.utils.*;
    import mortal.game.cache.*;
    import mortal.game.events.*;
    import mortal.game.mvc.*;
    import mortal.game.net.broadCast.*;
    import mortal.game.view.task.*;
    import mortal.game.view.task.data.*;
    import mortal.mvc.core.*;

    public class TaskDoingAddCommand extends BroadCastCall
    {

        public function TaskDoingAddCommand(param1:Object)
        {
            super(param1);
            return;
        }// end function

        override public function call(param1:MessageBlock) : void
        {
            Log.error("TaskDoingAddCommand...请求服务器接取任务，到服务器返回进行中的任务列表时间=" + (getTimer() - TaskCache.endTaskTime));
            var _loc_2:* = param1.messageBase as STaskAdd;
            Cache.instance.task.addTaskDoing(_loc_2.playerTask);
            NetDispatcher.dispatchCmd(ServerCommand.TaskDoingAdd, _loc_2.playerTask.task.code);
            if (TaskUtil.isGuildTask(_loc_2.playerTask.task))
            {
                Dispatcher.dispatchEvent(new DataEvent(EventName.TaskGuildGot, _loc_2.playerTask));
            }
            return;
        }// end function

    }
}
